package com.lute.model;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
public class ClientCategory {

	private int id_client_category;
	private String name;
	private ClientProfile clientProf;
	private Set<CompanyCategory> companyCategories = new HashSet<CompanyCategory>();
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="id_client_category")
	public int getId_client_category() {
		return id_client_category;
	}
	public void setId_client_category(int id_client_category) {
		this.id_client_category = id_client_category;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@ManyToMany(mappedBy="clientCategories")
	public Set<CompanyCategory> getCompanyCategories() {
		return companyCategories;
	}
	public void setCompanyCategories(Set<CompanyCategory> companyCategories) {
		this.companyCategories = companyCategories;
	}
	
	@ManyToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="id_clientprofie")
	public ClientProfile getClientProf() {
		return clientProf;
	}
	public void setClientProf(ClientProfile clientProf) {
		this.clientProf = clientProf;
	}
	
	
}
